Chart3D for WPF and Silverlight > Using Chart3D for WPF and Silverlight > Adding a Chart Legend |
Chart3D for WPF and Silverlight allows you to show a legend for contour or zone charts.The legend element displays information about each data series of the chart. The chart legend displays the mapping between the physical colors and the data series. It is controlled by the Legend property of C1Chart3D.
To add a legend for the chart, follow these steps:
XAML Copy Code <c1chart3d:C1Chart3D Height="150" HorizontalAlignment="Left" Margin="137,77,0,0" Name="c1Chart3D1" VerticalAlignment="Top" Width="200" ChartType="SurfaceZone"> <c1chart3d:GridDataSeries ZDataString="1 1 1,2 2 2,3 3 3" /> </c1chart3d:C1Chart3D>
XAML Copy Code <c1chart3d:C1Chart3D Height="150" HorizontalAlignment="Left" Margin="178,85,0,0" Name="c1Chart3D1" VerticalAlignment="Top" Width="200" ChartType="SurfaceZone"> <c1chart3d:C1Chart3D.Legend> <c1chart3d:C1Chart3DLegend /> </c1chart3d:C1Chart3D.Legend> <c1chart3d:GridDataSeries ZDataString="1 1 1,2 2 2,3 3 3" /> </c1chart3d:C1Chart3D>Your chart will look similar to the following:
Note that a legend is visible for contour or zone charts only.